Music - Replacement Commands

Introduction

The music options can be used to make all your music files have consistent formatting. The user can select which replacement commands are enabled during a music scan. Ideally all options should be enabled at the same time. This is because some of the options result in side-effects which would be cleaned up by other options. All options are listed in the sections below. Any side-effects are explained. Each section has a table with example replacements. Unless specified otherwise, the examples are all assuming mp3 scans. For other types of scans, just replace the '.mp3' extensions with the applicable extension (e.g. '.ogg' or '.flac')

Use Forward Quote Instead of Backquote

Replaces the backquote character ("`") with the forward quote character ("'").

Side Effects: None.

Examples:

String before Replacement  String after Replacements 
`abc`.mp3 'abc'.mp3
``abc``.mp3 ''abc''.mp3
`ab`c`.mp3 'ab'c'.mp3


Use ' - ' for Field Delimiter

Replaces '~', '_', or '=' characters with '-' characters. If there are consecutive delimiter characters, they will be replaced with a single delimiter. If there are missing blanks around a delimiter, then the character sequence will be modified so that there is at least a single blank on each side of the delimiter. If it is found that there are numbers with at least 2 digits on both sides of a dash, then it is assumed that the dash is not a field delimiter but is some kind of date range. In such a case any spaces around the dash will be removed.

Side Effects: It's possible for the string to end up with extra blanks. Enable the 'Eliminate Multiple/Extra Blank Sequences' option to compensate.

Examples:

String before Replacement  String after Replacements 
abc -- abc.mp3 abc - abc.mp3
abc = abc_abc ~ abc.mp3 abc - abc - abc - abc.mp3
abc==abc__abc~~~abc == abc.mp3 abc - abc - abc - abc.mp3


Use 'No.<number>' for Numbers; e.g. No.5

Number prefixes are often used in names of classical music files. This option is used to replace number prefixes plus numbers with 'No.<number>'. Number prefixes include 'no' (and all letter case variations) and 'nr' (and all letter case variations) followed by an optional period.

If the words Concerto, Sonata, Sonate, Symphonie, Symphony (and all their letter case variations) appear before a number sign, then:

  1. 'Sonate' (and all it's letter case variations) will be replaced with 'Sonata', and 'Symphonie' (and all it's letter case variations) will be replaced with 'Symphony'
  2. #<number> will be replaced with 'No.<number>'
Side Effects: In some cases multiple blank sequences within the number string will be reduced to single or no blanks.

Examples:

String before Replacement  String after Replacements 
Beethoven - Romance Nr5.mp3 Beethoven - Romance No.5.mp3
Beethoven - Symphony No5.mp3 Beethoven - Symphony No.5.mp3
Beethoven - Symphony NR5.mp3 Beethoven - Symphony No.5.mp3
Beethoven - Symphony no.5.mp3 Beethoven - Symphony No.5.mp3
Beethoven - Symphony no .5.mp3 Beethoven - Symphony No.5.mp3
Beethoven - Symphony nR5.mp3 Beethoven - Symphony No.5.mp3
Beethoven - Symphony #5.mp3 Beethoven - Symphony No.5.mp3
Beethoven - Symphonie #5.mp3 Beethoven - Symphony No.5.mp3
Beethoven - Sonata #5.mp3 Beethoven - Sonata No.5.mp3
Beethoven - Concerto # 5.mp3 Beethoven - Concerto No.5.mp3
Beethoven - Concerto 5.mp3 Beethoven - Concerto No.5.mp3
Beethoven - Concerto5.mp3 Beethoven - Concerto No.5.mp3


Use 'Op.<number>' for Opus's; e.g. Op.6

Opus prefixes are often used in names of classical music files. This option is used to replace opus prefixes plus numbers with 'Op.<number>'. Opus prefixes include 'op' (and all letter case variations) and 'opus' (and all letter case variations).

Side Effects: In some cases multiple blank sequences within the opus string will be reduced to single or no blanks.

Examples:

String before Replacement  String after Replacements 
Beethoven - Romance No.2 in F Opus50.mp3 Beethoven - Romance No.2 in F Op.50.mp3
Beethoven - String Quartet No.12 in E - Flat Major, OP.127.mp3 Beethoven - String Quartet No.12 in E - Flat Major, Op.127.mp3
Beethoven - String Quartet No.12 in E - Flat Major, op127.mp3 Beethoven - String Quartet No.12 in E - Flat Major, Op.127.mp3
Beethoven - String Quartet No.12 in E - Flat Major, OPUS.127.mp3 Beethoven - String Quartet No.12 in E - Flat Major, Op.127.mp3
Beethoven - String Quartet No.12 in E - Flat Major, oP127.mp3 Beethoven - String Quartet No.12 in E - Flat Major, Op.127.mp3


Use Extension Indicated by Scan - e.g. .mp3, .ogg, .wav

Change different extension variations to the extension indicated by the scan. For example, if an mp3 scan is performed, then all mp3 extension variations will be changed to '.mp3' Extension variations include double extensions, up to 2 digit numbers in parentheses before the extension, extensions that are not all lower case, extensions prefixed by kbps indicators in parentheses, and extensions prefixed by commas or up to 2 periods.

Side Effects: In some cases multiple blank sequences will be reduced to single or no blanks.

Examples:

String before Replacement  String after Replacements 
Aerosmith - Dream On.MP3 Aerosmith - Dream On.mp3
Aerosmith - Dream On.Mp3 Aerosmith - Dream On.mp3
Aerosmith - Dream On.mp3.MP3 Aerosmith - Dream On.mp3
Aerosmith - Dream On - .MP3 Aerosmith - Dream On.mp3
Aerosmith - Dream On , .MP3 Aerosmith - Dream On.mp3
Aerosmith - Dream On(1).MP3 Aerosmith - Dream On.mp3
Aerosmith - Dream On(1) .MP3 Aerosmith - Dream On.mp3
Aerosmith - Dream On..MP3 Aerosmith - Dream On.mp3
Aerosmith - Dream On(192 kbps).MP3 Aerosmith - Dream On.mp3
Aerosmith - Dream On(192k).MP3 Aerosmith - Dream On.mp3
Aerosmith - Dream On(192 ks) .MP3 Aerosmith - Dream On.mp3


Use Parentheses '()' for Bracketing

Change all bracketing to parentheses. Bracketing that is changed includes '{'. '}', '[', and ']'.

Side Effects:
  1. If this fix results in a parenthesized number before the file extension, then the number will not be removed even if the 'Use extension indicated by scan' option is enabled. eg. [1].mp3 becomes (1).mp3, and the (1) sequence will not be removed. If this is not desirable then just perform the replacements and rescan with 'Use extension indicated by scan' option enabled.
  2. multiple brackets are collapsed to one. This does not happen with multiple parentheses.

Examples:

String before Replacement  String after Replacements 
Burton Cummings - Clap For the Wolfman [Live].mp3 Burton Cummings - Clap For the Wolfman (Live).mp3
Burton Cummings - Clap For the Wolfman {Live}.mp3 Burton Cummings - Clap For the Wolfman (Live).mp3
Burton Cummings - Clap For the Wolfman [{Live}].mp3 Burton Cummings - Clap For the Wolfman (Live).mp3
Burton Cummings - Clap For the Wolfman {[Live}.mp3 Burton Cummings - Clap For the Wolfman (Live).mp3


Eliminate Multiple/Extra Blank Sequences

Change multiple blank sequences to one blank. Blanks after an opening parentheses, before a closing parentheses, or before the filename extension are eliminated.

Side Effects: If a single dash appears before the filename extension, it will be eliminated.

Examples:

String before Replacement  String after Replacements 
Burton Cummings - Clap For the Wolfman (Live) .mp3 Burton Cummings - Clap For the Wolfman (Live).mp3
Burton Cummings - Clap For the Wolfman ( Live ).mp3 Burton Cummings - Clap For the Wolfman (Live).mp3
Burton Cummings - Clap For the Wolfman (Live) .mp3 Burton Cummings - Clap For the Wolfman (Live).mp3
Burton Cummings - Clap For the Wolfman (Live) - .mp3 Burton Cummings - Clap For the Wolfman (Live).mp3


Use Smart Title Case

The following algorithm is performed in sequence.
  1. Determine if filename string is all upper case or just has a few uppercase words. If it is detected that a) there are at least 2 consecutive words (one at least 3 letters long, the other at least 2 letters long) that are all upper case or b) there are 3 or more uppercase letters at the start of the name followed by a delimiter then it is assumed that the string is mostly or all uppercase and will therefore be converted to all- lower case.
    If the string is determined to not be all upper case by the above algorithm, then it is assumed that there are probably just a few uppercase abbreviations or words with uppercase letters that should be left alone. Therefore the all-lower case conversion is not performed and the sequence ends. Otherwise the sequence continues.
  2. The first letter of each word will be set to upper case (leading opening brackets (eg. '(', '[', '{' ) of each word are skipped).
  3. All leading and trailing whitespace characters will be eliminated.
  4. All remaining consecutive whitespace characters will be reduced to one blank.
The algorithm isn't perfect but should handle most case correction cases properly. Anything missed can be cleaned up using the pre-defined or custom replacement commands or using the
'Force Case' lists.

Side Effects: None

Examples:

String before Replacement  String after Replacements 
abc - abd.mp3 Abc - Abc.mp3
abc in the def.mp3 Abc - In The Def.mp3
ABC On (featuring xx) .mp3 Abc On (Featuring Xx).mp3
abc on the stage ALBW (featuring xx).mp3 Abc On The Stage ALBW (Featuring Xx).mp3
ABBA - SOS (live).mp3 ABBA - SOS (Live).mp3
ABC On THE stage.mp3 Abc On THE Stage.mp3
ABC (on THE stage).mp3 ABC (On THE Stage).mp3


Force Case of Words Listed in 'Force Case List Options'

There are some words that users would like to appear in a specific letter case sequence. For example the names ACDC, REM, or LSO might appear with different letter cases in filenames. After all other replacements are performed using the different music options, scans are made for specific words to ensure that they are in the correct letter case. The words are defined in the lists that are configured in the music 'Force Case List' options The lists to choose from are as follows:
  1. Force Case List (All)

    This list contains words that will be replaced if they don't appear in the correct letter case AND they are preceeded AND followed by a period, opening parentheses, comma, blank, or backquote. The words will also be replaced if they don't appear in the correct letter case AND they are at the start of the filename AND are followed by a period, opening parentheses, comma, blank, or backquote.
  2. Force Case List (middle)

    This list contains words that will be replaced if they don't appear in the correct letter case AND they are preceeded AND followed by a blank. The words will not be replaced if the preceeding blank is preceeded by a dash delimiter or an '&' This list can be used to keep words such as 'a', 'and', 'in', 'at', 'is', 'of', 'or', 'on', 'to', or 'the'
Side Effects: If words in a list appear more than once in a sequence, then the first word will be replaced but the second one will be ignored, the third replaced, the fourth ignored, etc.

For the following examples, assume the words 'SOS' and 'REM' are in the Force List (All) list and the words 'in' and 'the' are in the Force List (middle) list.

Examples:

String before Replacement  String after Replacements 
Abba - sos.mp3 Abba - SOS.mp3
Abba - sos sos.mp3 Abba - SOS sos.mp3
Artist - Stuck - In THe Middle.mp3 Artist - Stuck - In the Middle.mp3
rem & The Band - The Remarkable Harem.mp3 REM & The Band - The Remarkable Harem.mp3
ABC - What is On THE Stage.mp3 ABC - What is on the Stage.mp3